package Mysoftwork;

import static org.junit.Assert.*;

import org.junit.Test;

public class WordCountTest {

	@Test
	public void testCharCount1() throws Exception{//测试中文无效
		//fail("Not yet implemented");
		String path ="input1.txt";
		assertEquals("characters: 0",WordCount.charCount(path));
	}

	@Test
	public void testWordCount1() throws Exception{
		String path ="input1.txt";
		assertEquals("words:0",WordCount.wordCount(path));
	}
	
	@Test
	public void testLineCount1() throws Exception {
		String path ="input1.txt";
		assertEquals("lines:1",WordCount.lineCount(path));
	}

	
	@Test
	public void testCharCount2() throws Exception{//测试按顺序输出
		//fail("Not yet implemented");
		String path ="input2.txt";
		assertEquals("characters: 21",WordCount.charCount(path));
	}

	@Test
	public void testWordCount2() throws Exception{
		String path ="input2.txt";
		assertEquals("words:2",WordCount.wordCount(path));
	}
	
	@Test
	public void testLineCount2() throws Exception {
		String path ="input2.txt";
		assertEquals("lines:1",WordCount.lineCount(path));
	}

	
	@Test
	public void testCharCount3() throws Exception{//测试不区分大小写
		//fail("Not yet implemented");
		String path ="input3.txt";
		assertEquals("characters: 21",WordCount.charCount(path));
	}

	@Test
	public void testWordCount3() throws Exception{
		String path ="input3.txt";
		assertEquals("words:2",WordCount.wordCount(path));
	}
	
	@Test
	public void testLineCount3() throws Exception {
		String path ="input3.txt";
		assertEquals("lines:1",WordCount.lineCount(path));
	}

	

}
